<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    91. Decode Ways
   </h1>
   <p>
    A message containing letters from
    <code>
     A-Z
    </code>
    is being encoded to numbers using the following mapping:
   </p>
   <pre>
'A' -&gt; 1
'B' -&gt; 2
...
'Z' -&gt; 26
</pre>
   <p>
    Given a
    <strong>
     non-empty
    </strong>
    string containing only digits, determine the total number of ways to decode it.
   </p>
   <p>
    <strong>
     Example 1:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> "12"
<strong>Output:</strong> 2
<strong>Explanation:</strong>&nbsp;It could be decoded as "AB" (1 2) or "L" (12).
</pre>
   <p>
    <strong>
     Example 2:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> "226"
<strong>Output:</strong> 3
<strong>Explanation:</strong>&nbsp;It could be decoded as "BZ" (2 26), "VF" (22 6), or "BBF" (2 2 6).</pre>
  </div>
  <div>
   <h1 class="question_title">
    91. 解码方法
   </h1>
   <p>
    一条包含字母&nbsp;
    <code>
     A-Z
    </code>
    的消息通过以下方式进行了编码：
   </p>
   <pre>'A' -&gt; 1
'B' -&gt; 2
...
'Z' -&gt; 26
</pre>
   <p>
    给定一个只包含数字的
    <strong>
     非空
    </strong>
    字符串，请计算解码方法的总数。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre><strong>输入:</strong> "12"
<strong>输出:</strong> 2
<strong>解释:</strong>&nbsp;它可以解码为 "AB"（1 2）或者 "L"（12）。
</pre>
   <p>
    <strong>
     示例&nbsp;2:
    </strong>
   </p>
   <pre><strong>输入:</strong> "226"
<strong>输出:</strong> 3
<strong>解释:</strong>&nbsp;它可以解码为 "BZ" (2 26), "VF" (22 6), 或者 "BBF" (2 2 6) 。
</pre>
  </div>
 </body>
</html>